import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    name: 'Login',
    component: () => import('../views/Login'),
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/Home'),
    children:[
      {
        path: '/bookmanage',
        name: 'BookManage',
        component: () => import('../views/Home/BookManage'),
      },
      {
        path: '/addbook',
        name: 'AddBook',
        component: () => import('../components/AddBook'),
      },
      {
        path: '/usermanage',
        name: 'UserManage',
        component: () => import('../views/Home/UserManage'),
      },
      {
        path: '/adduser',
        name: 'AddUser',
        component: () => import('../components/AddUser'),
      },
      {
        path: '/personmanage',
        name: 'PersonManage',
        component: () => import('../views/Home/PersonalManage'),
      },
      {
        path: '/projectinfo',
        name: 'ProjectInfo',
        component: () => import('../views/Home/ProjectInfo'),
      },
    ]
  },
  {
    path: '/blankpage',
    name: 'BlankPage',
    component: () => import('../views/BlankPage'),
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
});

export default router
